package com.yb.sys.auth.controller;


import com.yb.core.bean.Resp;
import com.yb.sys.auth.service.ISysMenuService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 姚兵
 * @since 2022-11-17
 */
@RestController
@RequestMapping("/menu")
@Slf4j
public class SysMenuController {
    @Autowired
    private ISysMenuService sysMenuService;

    @RequestMapping("list")
    public Resp list(){
        try {

            return Resp.ok().data( sysMenuService.list());
        }catch (Exception e){
            log.info("{}",e);
        }

        return Resp.error();
    }
}
